<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/rjcs/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/rjcs/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/rjcs/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/rjcs/images/logo.svg" color="#222">

<link rel="stylesheet" href="/rjcs/css/main.css">



<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css" integrity="sha256-mUZM63G8m73Mcidfrv5E+Y61y7a12O5mW4ezU3bxqW4=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"raojincs.gitee.io","root":"/rjcs/","images":"/rjcs/images","scheme":"Muse","darkmode":false,"version":"8.8.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/rjcs/js/config.js"></script>
<meta name="description" content="搭建个人博客1：下载node.js和git,npm(此处不做介绍，自行安装)2: 安装hexo12345npm install hexo-cli -ghexo init blog      &#x2F;&#x2F;初始化cd blognpm installhexo server       想了解的更加详细可以进入hexo官网 https:&#x2F;&#x2F;hexo.io&#x2F;zh-cn&#x2F; 常用命令1234hexo clean">
<meta property="og:type" content="article">
<meta property="og:title" content="搭建个人博客">
<meta property="og:url" content="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/index.html">
<meta property="og:site_name" content="RoseJoker">
<meta property="og:description" content="搭建个人博客1：下载node.js和git,npm(此处不做介绍，自行安装)2: 安装hexo12345npm install hexo-cli -ghexo init blog      &#x2F;&#x2F;初始化cd blognpm installhexo server       想了解的更加详细可以进入hexo官网 https:&#x2F;&#x2F;hexo.io&#x2F;zh-cn&#x2F; 常用命令1234hexo clean">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/yml%E9%85%8D%E7%BD%AE.jpg">
<meta property="og:image" content="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E6%8F%92%E5%85%A5%E5%9B%BE%E7%89%87%E7%9B%B8%E5%85%B3%E8%AE%BE%E7%BD%AE.png">
<meta property="og:image" content="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E5%88%87%E6%8D%A2%E4%B8%BB%E9%A2%98.png">
<meta property="og:image" content="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E5%88%9B%E5%BB%BA%E4%BB%93%E5%BA%93.jpg">
<meta property="og:image" content="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E7%94%B3%E8%AF%B7page.jpg">
<meta property="og:image" content="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E9%A1%B5%E9%9D%A2%E8%AE%BE%E7%BD%AE.jpg">
<meta property="article:published_time" content="2021-12-20T13:32:24.892Z">
<meta property="article:modified_time" content="2021-12-20T14:44:41.609Z">
<meta property="article:author" content="CS">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/yml%E9%85%8D%E7%BD%AE.jpg">


<link rel="canonical" href="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/","path":"2021/12/20/搭建自己的博客/","title":"搭建个人博客"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>搭建个人博客 | RoseJoker</title>
  




  <noscript>
    <link rel="stylesheet" href="/rjcs/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
    </div>
  </div>

  <div class="site-meta">

    <a href="/rjcs/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">RoseJoker</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">看详细日志可点击左下角，点击查看更多</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>







</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2"><span class="nav-number">1.</span> <span class="nav-text">搭建个人博客</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1%EF%BC%9A%E4%B8%8B%E8%BD%BDnode-js%E5%92%8Cgit-npm-%E6%AD%A4%E5%A4%84%E4%B8%8D%E5%81%9A%E4%BB%8B%E7%BB%8D%EF%BC%8C%E8%87%AA%E8%A1%8C%E5%AE%89%E8%A3%85"><span class="nav-number">1.0.1.</span> <span class="nav-text">1：下载node.js和git,npm(此处不做介绍，自行安装)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-%E5%AE%89%E8%A3%85hexo"><span class="nav-number">1.0.2.</span> <span class="nav-text">2: 安装hexo</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4"><span class="nav-number">1.0.3.</span> <span class="nav-text">常用命令</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%9B%BE%E7%89%87%E6%97%A0%E6%B3%95%E6%AD%A3%E7%A1%AE%E6%98%BE%E7%A4%BA%EF%BC%88%E4%BB%85%E4%BE%9B%E5%8F%82%E8%80%83-%E4%B8%8D%E8%A1%8C%E7%9A%84%E8%AF%9D-%E5%86%8D%E5%8E%BB%E7%99%BE%E5%BA%A6%EF%BC%89"><span class="nav-number">1.0.4.</span> <span class="nav-text">图片无法正确显示（仅供参考  不行的话  再去百度）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%88%9B%E5%BB%BA%E6%96%B0%E7%9A%84%E6%96%87%E7%AB%A0"><span class="nav-number">1.0.5.</span> <span class="nav-text">创建新的文章</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%9B%B4%E6%8D%A2%E4%B8%BB%E9%A2%98"><span class="nav-number">1.0.6.</span> <span class="nav-text">更换主题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%83%A8%E7%BD%B2%E5%88%B0%E7%A0%81%E4%BA%91%E4%B8%8A"><span class="nav-number">1.0.7.</span> <span class="nav-text">部署到码云上</span></a></li></ol></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">CS</p>
  <div class="site-description" itemprop="description">看详细日志可查看左下角，点击查看更多</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/rjcs/archives/">
          <span class="site-state-item-count">3</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
  </nav>
</div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://raojincs.gitee.io/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/rjcs/images/avatar.gif">
      <meta itemprop="name" content="CS">
      <meta itemprop="description" content="看详细日志可查看左下角，点击查看更多">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="RoseJoker">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          搭建个人博客
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>
      

      <time title="创建时间：2021-12-20 21:32:24 / 修改时间：22:44:41" itemprop="dateCreated datePublished" datetime="2021-12-20T21:32:24+08:00">2021-12-20</time>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h1 id="搭建个人博客"><a href="#搭建个人博客" class="headerlink" title="搭建个人博客"></a>搭建个人博客</h1><h3 id="1：下载node-js和git-npm-此处不做介绍，自行安装"><a href="#1：下载node-js和git-npm-此处不做介绍，自行安装" class="headerlink" title="1：下载node.js和git,npm(此处不做介绍，自行安装)"></a>1：下载node.js和git,npm(此处不做介绍，自行安装)</h3><h3 id="2-安装hexo"><a href="#2-安装hexo" class="headerlink" title="2: 安装hexo"></a>2: 安装hexo</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-cli -g</span><br><span class="line">hexo init blog      //初始化</span><br><span class="line"><span class="built_in">cd</span> blog</span><br><span class="line">npm install</span><br><span class="line">hexo server    </span><br></pre></td></tr></table></figure>

<p> 想了解的更加详细可以进入hexo官网 <a target="_blank" rel="noopener" href="https://hexo.io/zh-cn/">https://hexo.io/zh-cn/</a></p>
<h3 id="常用命令"><a href="#常用命令" class="headerlink" title="常用命令"></a>常用命令</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">hexo clean    //hexo cl</span><br><span class="line">hexo generate     //可以hexo g</span><br><span class="line">hexo server    //可以hexo s</span><br><span class="line">hexo deploy   //可以hexo d   推送之前先看配置的远程地址是否配置好</span><br></pre></td></tr></table></figure>

<img src="/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/yml%E9%85%8D%E7%BD%AE.jpg" class title="yml配置">

<h3 id="图片无法正确显示（仅供参考-不行的话-再去百度）"><a href="#图片无法正确显示（仅供参考-不行的话-再去百度）" class="headerlink" title="图片无法正确显示（仅供参考  不行的话  再去百度）"></a>图片无法正确显示（仅供参考  不行的话  再去百度）</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">配置 Typora 偏好设置</span><br><span class="line">修改_config.yml中的post_asset_folder，<span class="literal">false</span> 改为 <span class="literal">true</span>，这样修改后，每次 ‘hexo new page’ 生成新文章，都会在文章文件同级目录创建一个与文章文件名同名的文件夹，我们就在这里存放此文章的图片</span><br><span class="line">npm install hexo-asset-img --save</span><br><span class="line">hexo clean &amp;&amp; hexo g &amp;&amp; hexo s</span><br><span class="line">完成安装</span><br></pre></td></tr></table></figure>

<img src="/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E6%8F%92%E5%85%A5%E5%9B%BE%E7%89%87%E7%9B%B8%E5%85%B3%E8%AE%BE%E7%BD%AE.png" class title="插入图片相关设置">

<h3 id="创建新的文章"><a href="#创建新的文章" class="headerlink" title="创建新的文章"></a>创建新的文章</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new <span class="string">&quot;name&quot;</span>     //可以hexo n</span><br></pre></td></tr></table></figure>

<p>以上操作都在git bash里操作 </p>
<h3 id="更换主题"><a href="#更换主题" class="headerlink" title="更换主题"></a>更换主题</h3><img src="/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E5%88%87%E6%8D%A2%E4%B8%BB%E9%A2%98.png" class title="切换主题">





<h3 id="部署到码云上"><a href="#部署到码云上" class="headerlink" title="部署到码云上"></a>部署到码云上</h3><figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">创建仓库   //路径和名称最后与归属一样</span><br></pre></td></tr></table></figure>

<img src="/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E5%88%9B%E5%BB%BA%E4%BB%93%E5%BA%93.jpg" class title="创建仓库">

<figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">申请页面</span><br></pre></td></tr></table></figure>

<img src="/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E7%94%B3%E8%AF%B7page.jpg" class title="申请page">



<figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">将地址写入根目录的<span class="emphasis">_config.yml  中的url</span></span><br><span class="line"><span class="emphasis">每次提交代码也要点击更新才会生效</span></span><br></pre></td></tr></table></figure>



<img src="/rjcs/2021/12/20/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E9%A1%B5%E9%9D%A2%E8%AE%BE%E7%BD%AE.jpg" class title="页面设置">
    </div>

    
    
    

    <footer class="post-footer">

        

          <div class="post-nav">
            <div class="post-nav-item">
            </div>
            <div class="post-nav-item">
                <a href="/rjcs/2021/12/21/%E4%BB%8E%E5%A4%B4%E5%BC%80%E5%A7%8B%E7%BC%96%E8%AF%91%E5%AE%89%E5%8D%93%E6%BA%90%E7%A0%81/" rel="next" title="从头开始编译安卓源码">
                  从头开始编译安卓源码 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">CS</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/muse/" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/rjcs/js/comments.js"></script><script src="/rjcs/js/utils.js"></script><script src="/rjcs/js/motion.js"></script><script src="/rjcs/js/schemes/muse.js"></script><script src="/rjcs/js/next-boot.js"></script>

  





  





</body>
</html>
